package com.test.tinyurl.domain.controller;

import com.test.tinyurl.util.ViewUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/admin")
public class MainController {

    @GetMapping(value = "/main")
    public ModelAndView main() {
        Map<String, Object> maps = new HashMap<>(16);
        return ViewUtil.buildDefault("main", maps);
    }

    @GetMapping(value = "/link")
    public ModelAndView link(){
        Map<String, Object> maps = new HashMap<>(16);
        return ViewUtil.buildDefault("module/link", maps);
    }
}
